<template>
	<div>
		<!-- 分页组件 -->
		<el-pagination
			@size-change="handleSizeChange"
			@current-change="handleCurrentChange"
			:current-page="studentSearchForm.page"
			:page-sizes="[5, 10, 15, 20]"
			:page-size="5"
			layout="total, sizes, prev, pager, next, jumper"
			:total="pageSize"
		></el-pagination>
	</div>
</template>

<script>
export default {
	props:['studentSearchForm','pageSize'],
	data() {
		return {
			currPage: 2
		};
	},
	methods: {
		/* 当前页数显示的条数改变时 */
		handleSizeChange(val) {
			//console.log(`每页 ${val} 条`);
			this.studentSearchForm.limit = val;
			this.$parent.search_studentInfo();
		},
		/* 翻页时 */
		handleCurrentChange(val) {
			//console.log(`当前页: ${val}`);
			this.studentSearchForm.page = val;
			this.$parent.search_studentInfo();
		},
	}
};
</script>

<style></style>
